package com.dal.elasticsearch.pojo;

import com.dal.elasticsearch.annotation.Field;
import com.dal.elasticsearch.enums.AnalyzerType;
import com.dal.elasticsearch.enums.FieldType;
import lombok.Data;

import java.io.Serializable;

/**
 * @ClassName EsGoodsVo
 * @Author jian
 * @Date 8:21 PM 2022/11/30
 **/
@Data
public class EsGoodsVo implements Serializable {

    @Field(type = FieldType.KEYWORD)
    private String id;

    @Field(type = FieldType.KEYWORD)
    private String brandId;
    /**
     * 1级类目
     */
    @Field(type = FieldType.KEYWORD)
    private String cid1;
    /**
     * 2级类目
     */
    @Field(type = FieldType.KEYWORD)
    private String cid2;
    /**
     * 3级类目
     */
    @Field(type = FieldType.KEYWORD)
    private String cid3;
    /**
     * 名称
     */
    @Field(type = FieldType.TEXT,analyzer = AnalyzerType.IK_SMART)
    private String name;
    /**
     * 子标题
     */
    @Field(type = FieldType.TEXT,analyzer = AnalyzerType.IK_SMART)
    private String subTitle;
    /**
     * 是否上架
     */
    @Field(type = FieldType.INTEGER)
    private Integer saleable;

    /**
     * 商品分类名称拼接
     */
    @Field(type = FieldType.TEXT,analyzer = AnalyzerType.IK_SMART)
    private String categoryName;
    /**
     * 品牌名称
     */
    @Field(type = FieldType.TEXT,analyzer = AnalyzerType.IK_SMART)
    private String brandName;

    @Field(type = FieldType.OBJECT,analyzer = AnalyzerType.IK_SMART)
    private Object spuDetail;

    @Field(type = FieldType.OBJECT,analyzer = AnalyzerType.IK_SMART)
    private Object skus;
}
